//
//  UserDefaultSave.m
//  CI
//
//  Created by tongbu_jinzhongjun on 14-10-23.
//  Copyright (c) 2014年 tongbu_jinzhongjun. All rights reserved.
//

#import "UserDefaultSave.h"
#import <Objection.h>

#define UserName_CI @"UserName"
#define Password_CI @"Password"
#define UserId_CI @"userId"

@implementation UserDefaultSave
objection_register_singleton(UserDefaultSave)


-(void)savePassword:(NSString *)password {
    [[NSUserDefaults standardUserDefaults] setObject:password forKey:Password_CI];
    [[NSUserDefaults standardUserDefaults] synchronize];
}
-(void)saveUserName:(NSString *)userName {
    [[NSUserDefaults standardUserDefaults] setObject:userName forKey:UserName_CI];
    [[NSUserDefaults standardUserDefaults]synchronize];

}
-(void)saveUserId:(NSString *)userId {
    [[NSUserDefaults standardUserDefaults] setObject:userId forKey:UserId_CI];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

-(NSString*)getPassword {
 return    [[NSUserDefaults standardUserDefaults] objectForKey:Password_CI];

}

-(NSString*)getUserName {
   return [[NSUserDefaults standardUserDefaults] objectForKey:UserName_CI];
}

-(NSString *)getUserId {
    return [[NSUserDefaults standardUserDefaults] objectForKey:UserId_CI];
}


@end
